package cn.minhx.types.design.link.multi;

import cn.minhx.types.design.link.multi.chain.BusinessLinkedList;
import cn.minhx.types.design.link.multi.handler.ILogicHandler;
import lombok.Getter;

/**
 * 链装配
 *
 * @author min
 */
@Getter
public class LinkArmory<T, D, R> {

	private final BusinessLinkedList<T, D, R> logicLink;

	@SafeVarargs
	public LinkArmory(String linkName, ILogicHandler<T, D, R>... logicHandlers) {
		logicLink = new BusinessLinkedList<>(linkName);
		for (ILogicHandler<T, D, R> logicHandler : logicHandlers) {
			logicLink.add(logicHandler);
		}
	}
}
